<template>
	<view>
		<block v-for="(value, index) in listData" :key="index">
			<view class="uni-list-cell" hover-class="uni-list-cell-hover" @click="checkBaseInfo(value)">
				<view class="uni-media-list">
					<text class="uni-media-list-logo">{{value.name | filterUserName}}</text>
					<view class="uni-media-list-body">
						<view class="uni-media-list-text-top flex-between">
							<text>{{value.name}}</text>
							<text>创建时间：{{value.createTime ? value.createTime : '--'}}</text>
						</view>
						<view class="uni-media-list-text-bottom flex-between">
							<text>职务：{{ value.post || '--'}}</text>
							<text>电话：{{ value.mobile ? value.mobile : value.telephone ? value.telephone : '--'}}</text>
						</view>
						<view>是否关键决策人：{{value['是否关键决策人'] ? value['是否关键决策人'] : '否'}}</view>
						<view>关联客户：{{value.customerName}}</view>
						<view>下次联系时间：{{value.nextTime || '--'}}</view>
					</view>
				</view>
			</view>
		</block>
	</view>
</template>

<script>
import common from '../../mixins/common.js';
export default {
	props: {
		listData: {
			type: Array,
			default: {
				return: [],
			},
		},
		crmType: {
			type: String,
			default: '',
		},
	},
	mixins: [common],
	filters: {
		filterUserName(name) {
			if (name) {
				return name.substring(name.length - 2, name.length);
			}
		},
	},
	methods: {},
};
</script>

<style lang="scss" scoped>
@import '@/pages/customerManagement/styles/list.scss';
</style>
